Add Foreign Keys

To add a foreign key

Hint: When you hover over a foreign key line, the referenced fields and the referencing fields are highlighted.

The pop-up menu options of the foreign key in the canvas include:

Option

Description

Design Foreign Key

Edit the foreign key in a table designer. The options in the designer depend on the diagram database type you are chosen.

Go to

Go to and select the connected table/collection.

Reroute Connectors

Reroute the connector to the closest points between two connected objects.

Copy

Copy the foreign key from the diagram to the clipboard.

Paste

Paste the content from the clipboard into the diagram.

Save as Image

Save the foreign key as a PNG file.

Select All Connected Objects

Select all objects in the diagram that are connected by the foreign key.

Select All Relations

Select all foreign keys in the diagram.

Delete from Diagram and Model

Delete a foreign key from both diagram and model.

Color

Change the color of the foreign key.

Group / Ungroup

Group or ungroup the foreign key and other objects in the diagram.

Lock / Unlock

Lock or unlock the foreign key in the diagram.

Properties

Once you have selected the foreign key, you can customize the foreign key by changing its properties:

Option

Description

Foreign Key

Name

Enter the name of the foreign key.

Position

Customize the position of the line.

Offset

Customize offset values for the start and end of the line.

Show name

Display the name of the foreign key.

Font

Set the font style of the name.

Bold

Apply a bold style to the name.

Italic

Apply an italic style to the name.

Color

Set the color of the line.

Line Width

Choose the thickness of the line.

Cardinality

Specify the relationship cardinality of the table/collection.

Visible

Show the connector.

Group / Ungroup

Group or ungroup the foreign key and other objects in the diagram.

Lock / Unlock

Lock or unlock the foreign key in the diagram.